package com.xinzhou.demo.controller;

import com.xinzhou.demo.entity.EntityMike;
import com.xinzhou.demo.entity.EntityTest;
import com.xinzhou.demo.service.ServiceMike;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName ControllerMike
 * @Description TODO
 * @Author Mike
 * @Date 2019/5/31 19:40
 * @Version 1.0
 */
@RestController
public class ControllerMike {

    @Autowired
    ServiceMike serviceMike;

    @GetMapping("/mike")
    public Object dbOperation(EntityMike entityMike){
        System.out.println(entityMike);
        return serviceMike.test(entityMike);
    }

//    @GetMapping("/entity")
//    public Object entity(EntityMike entityMike){
//        return serviceMike.entity(entityMike);
//    }

    @GetMapping("/api")
    public String test(){
        return "ok";
    }
}
